#include<stdio.h>

int main(void)
{
	int digit=0,english=0,other=0;
	char ch;
	
	while((ch=getchar())!='\n')
	{
		if(ch>='0'&&ch<='9')
		{
			digit++;
		}
		else if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
		{
			english++;
		}
		else
		{
			other++;
		}
	}
	
	printf("letter:%d\ndigit:%d\nother:%d",english,digit,other);
	
	return 0;
}
